#ifndef MYCAMERA_H
#define MYCAMERA_H

#include <QObject>
#include <QImage>
#include<QMutex>
#include"imageviewer.h"
//#include"imageprocess.h"

class MyCamera :public QObject
{
    Q_OBJECT
public:
    MyCamera(QObject *parent=nullptr);

public:
    Q_INVOKABLE void openCam();
    Q_INVOKABLE void closeCam();

signals:
    void sigCurrentImgQ(const QImage& imgQ);
    //void sigCurrentImgQ(QImage imgQ);
    //void sigCurrentImgQ2(QImage imgQ); //给图像处理类
public:
    bool m_isCloseCam;
    QImage m_imgQ;
    QMutex m_mutex;
    ImageViewer* m_pImageViewer=nullptr;
    //ImageProcess* m_pImageProcess=nullptr;
};

#endif // MYCAMERA_H
